/**
 * 
 */
package arisufascion.com.model;

import java.util.ArrayList;
import java.util.List;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author Kelvin
 * 
 */
public class Product implements Parcelable{
	private String virtuemart_product_id;
	private String product_name;
	private String product_s_desc;
	private String product_desc;
	private float product_price;
	private String currency_name;
	private String category_name;
	private int color_id;
	private int color_quantity;
	private String color_image;
	private int quantity;
	private int color_size;
	private List<ImageSlider> images;
	private List<Attribute> attribute;

	/**
 * 
 */
	public Product() {
		super();
		// TODO Auto-generated constructor stub
	}

	public Product(Parcel in) {
		readFromParcel(in);
	}
	
	


	/**
	 * @param virtuemart_product_id
	 * @param product_name
	 * @param product_s_desc
	 * @param product_desc
	 * @param product_price
	 * @param currency_name
	 * @param category_name
	 * @param quantity
	 * @param images
	 * @param attribute
	 */
	public Product(String virtuemart_product_id, String product_name,
			String product_s_desc, String product_desc, float product_price,
			String currency_name, String category_name,int color_id,int color_quantity, String color_image, int quantity,int color_size,
			List<ImageSlider> images, List<Attribute> attribute) {
		super();
		this.virtuemart_product_id = virtuemart_product_id;
		this.product_name = product_name;
		this.product_s_desc = product_s_desc;
		this.product_desc = product_desc;
		this.product_price = product_price;
		this.currency_name = currency_name;
		this.category_name = category_name;
		this.color_id=color_id;
		this.color_quantity=color_quantity;
		this.color_image=color_image;
		this.quantity = quantity;
		this.color_size=color_size;
		this.images = images;
		this.attribute = attribute;
	}

	/**
	 * @return the virtuemart_product_id
	 */
	public String getVirtuemart_product_id() {
		return virtuemart_product_id;
	}

	/**
	 * @param virtuemart_product_id
	 *            the virtuemart_product_id to set
	 */
	public void setVirtuemart_product_id(String virtuemart_product_id) {
		this.virtuemart_product_id = virtuemart_product_id;
	}

	/**
	 * @return the product_name
	 */
	public String getProduct_name() {
		return product_name;
	}

	/**
	 * @param product_name
	 *            the product_name to set
	 */
	public void setProduct_name(String product_name) {
		this.product_name = product_name;
	}

	/**
	 * @return the product_s_desc
	 */
	public String getProduct_s_desc() {
		return product_s_desc;
	}

	/**
	 * @param product_s_desc
	 *            the product_s_desc to set
	 */
	public void setProduct_s_desc(String product_s_desc) {
		this.product_s_desc = product_s_desc;
	}

	/**
	 * @return the product_desc
	 */
	public String getProduct_desc() {
		return product_desc;
	}

	/**
	 * @param product_desc
	 *            the product_desc to set
	 */
	public void setProduct_desc(String product_desc) {
		this.product_desc = product_desc;
	}

	/**
	 * @return the product_price
	 */
	public float getProduct_price() {
		return product_price;
	}

	/**
	 * @param product_price
	 *            the product_price to set
	 */
	public void setProduct_price(float product_price) {
		this.product_price = product_price;
	}

	/**
	 * @return the images
	 */
	public List<ImageSlider> getImages() {
		return images;
	}

	/**
	 * @param images
	 *            the images to set
	 */
	public void setImages(List<ImageSlider> images) {
		this.images = images;
	}

	/**
	 * @return the currency_name
	 */
	public String getCurrency_name() {
		return currency_name;
	}

	/**
	 * @param currency_name
	 *            the currency_name to set
	 */
	public void setCurrency_name(String currency_name) {
		this.currency_name = currency_name;
	}

	/**
	 * @return the category_name
	 */
	public String getCategory_name() {
		return category_name;
	}

	/**
	 * @param category_name
	 *            the category_name to set
	 */
	public void setCategory_name(String category_name) {
		this.category_name = category_name;
	}
	
	
	/**
	 * @return the quantity
	 */
	public int getQuantity() {
		return quantity;
	}

	/**
	 * @param quantity the quantity to set
	 */
	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}

	
	
	/**
	 * @return the attribute
	 */
	public List<Attribute> getAttribute() {
		return attribute;
	}

	/**
	 * @param attribute the attribute to set
	 */
	public void setAttribute(List<Attribute> attribute) {
		this.attribute = attribute;
	}
	
	

	/**
	 * @return the color_id
	 */
	public int getColor_id() {
		return color_id;
	}

	/**
	 * @param color_id the color_id to set
	 */
	public void setColor_id(int color_id) {
		this.color_id = color_id;
	}

	public int getColor_quantity() {
		return color_quantity;
	}

	public void setColor_quantity(int color_quantity) {
		this.color_quantity = color_quantity;
	}

	/**
	 * @return the color_image
	 */
	public String getColor_image() {
		return color_image;
	}

	/**
	 * @param color_image the color_image to set
	 */
	public void setColor_image(String color_image) {
		this.color_image = color_image;
	}

	
	
	/**
	 * @return the color_size
	 */
	public int getColor_size() {
		return color_size;
	}

	/**
	 * @param color_size the color_size to set
	 */
	public void setColor_size(int color_size) {
		this.color_size = color_size;
	}

	@Override
	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}

	
	/*
	 * (non-Javadoc)
	 * 
	 * @see android.os.Parcelable#writeToParcel(android.os.Parcel, int)
	 */
	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(virtuemart_product_id);
		dest.writeString(product_name);
		dest.writeString(product_s_desc);
		dest.writeString(product_desc);
		dest.writeFloat(product_price);
		dest.writeString(category_name);
		dest.writeInt(color_id);
		dest.writeInt(color_quantity);
		dest.writeString(color_image);
		dest.writeInt(quantity);
		dest.writeInt(color_size);
		dest.writeList(images);
		dest.writeList(attribute);
		
	}

	/** The Constant CREATOR. */
	public static final Parcelable.Creator CREATOR = new Parcelable.Creator() {
		public Product createFromParcel(Parcel in) {
			return new Product(in);
		}

		public Product[] newArray(int size) {
			return new Product[size];
		}
	};

	/**
	 * Read from parcel.
	 * 
	 * @param in
	 *            the in
	 */
	private void readFromParcel(Parcel in) {
		virtuemart_product_id = in.readString();
		product_name = in.readString();
		product_s_desc = in.readString();
		product_desc = in.readString();
		product_price = in.readFloat();
		category_name = in.readString();
		color_id=in.readInt();
		color_quantity=in.readInt();
		color_image=in.readString();
		quantity=in.readInt();
		color_size=in.readInt();
		images=new ArrayList<ImageSlider>();
		in.readList(images, Product.class.getClassLoader());
		attribute=new ArrayList<Attribute>();
		in.readList(attribute, Product.class.getClassLoader());

	}

}
